翻訳と辞書
Words near each other
・ Line of succession to the Japanese throne
・ Line of succession to the Jordanian throne
・ Line of succession to the Liechtensteiner throne
・ Line of succession to the Luxembourger throne
・ Line of succession to the Malaysian throne
・ Line of succession to the Monegasque throne
・ Line D (Rome Metro)
・ Line dance
・ Line Daugaard
・ Line Defense
・ Line Delimited JSON
・ Line Describing a Cone
・ Line discipline
・ Line doubler
・ Line drawing
Line drawing algorithm
・ Line drive
・ Line driver
・ Line E (Buenos Aires Underground)
・ Line echo wave pattern
・ Line editor
・ Line element
・ Line Engaged
・ Line engraving
・ Line F (Buenos Aires Underground)
・ Line field
・ Line filter
・ Line fitting
・ Line Focus Principle
・ Line function


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Line drawing algorithm : ウィキペディア英語版
Line drawing algorithm

A line drawing algorithm is a graphical algorithm for approximating a line segment on discrete graphical media. On discrete media, such as pixel-based displays and printers, line drawing requires such an approximation (in nontrivial cases). Basic algorithms rasterize lines in one color. A better representation with multiple color gradations requires an advanced process, anti-aliasing.
On continuous media, by contrast, no algorithm is necessary to draw a line. For example, oscilloscopes use natural phenomena to draw lines and curves.
The Cartesian slope-intercept equation for a straight line is
Y= mx+b
With m representing the slope of the line and b as the y intercept. Given that the two endpoints of the line segment are specified at positions (x1,y1) and (x2,y2). we can determine values for the slope m and y intercept b with the following calculations, m=(y2-y1)/(x2-x1) so, b=y1-m.x1.
==A naive line-drawing algorithm==
The simplest method of screening is the direct drawing of the equation defining the line.

dx = x2 - x1
dy = y2 - y1
for x from x1 to x2

It is assumed here that the points have already been ordered so that x_2 > x_1.
This algorithm works just fine when dx >= dy (i.e., slope is less than or equal to 1), but if dx < dy (i.e., slope greater than 1), the line becomes quite sparse with lots of gaps, and in the limiting case of dx = 0, only a single point is plotted.
The naïve line drawing algorithm is inefficient and thus, slow on a digital computer. Its inefficiency stems from the number of operations and the use of floating-point calculations. Line drawing algorithms such as Bresenham's or Wu's are preferred instead.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Line drawing algorithm」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.